package com.design3.graduatethesissys.controller;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.design3.graduatethesissys.common.utils.GetUserName;

@Controller
public class Index {
	
	@RequestMapping(value = "/Student/Index")
	public String demo1(ModelMap data){
	    data.addAttribute("userName",GetUserName.getName());
	    return "Student/Index";
	}
	
	@RequestMapping(value = "/Admin/Index")
	public String demo2(ModelMap data){
		data.addAttribute("userName",GetUserName.getName());
	    return "Admin/Index";
	}
}
